from django.urls import path

from . import views

app_name = 'company'

urlpatterns = [
    # 公司管理
    path('companies/', views.company_list, name='company_list'),
    path('companies/<int:company_id>/', views.company_detail, name='company_detail'),
    
    # 用户管理
    path('users/', views.user_list, name='user_list'),
    path('users/<int:user_id>/', views.user_detail, name='user_detail'),
    path('users/<int:user_id>/password/', views.user_change_password, name='user_change_password'),

    # 部门管理
    path('departments/', views.department_list, name='department_list'),
    path('departments/stats/', views.department_stats, name='department_stats'),
    path('departments/<int:department_id>/', views.department_detail, name='department_detail'),

    # 财务管理
    path('finance/records/', views.finance_records, name='finance_records'),
    path('finance/aggregated-reports/', views.aggregated_financial_reports, name='aggregated_financial_reports'),
    path('finance/aggregated-reports/<int:report_id>/', views.aggregated_financial_report_detail, name='aggregated_financial_report_detail'),
    path('finance/aggregated-reports/<int:report_id>/analyze/', views.aggregated_financial_report_analyze, name='aggregated_financial_report_analyze'),
    path('finance/analysis/<int:analysis_id>/', views.financial_analysis_detail, name='financial_analysis_detail'),

    # 数据导出
    path('export/', views.export_data, name='export_data'),
]